<%-- 
    Document   : test1
    Created on : Dec 28, 2010, 4:30:14 PM
    Author     : admin
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
<%
    response.setHeader("Cache-Control", "no-cache");
    response.setHeader("Pragma", "no-cache");
    response.setDateHeader("Expires", -1);
    String url = request.getParameter("url");
    String q = null;
    if (url == null) {
     // url = "http://localhost:9080/elconverter/Oscar.docx";
      q = "tellabs form";
    }
    String ff = request.getParameter("f");
    if (ff == null) {
      ff = "rtf";
    }
    if (q == null)
      q = request.getParameter("q");
    if (q == null) q ="";
%>

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script type="text/JavaScript" src ="js/jquery-1.4.3.min.js" > </script>

    <script type="text/JavaScript" src ="/elconverter/jscon.js?url=<%= url%>&f=<%=ff%>&showID=showID2&q=<%=q%>" > </script>
    <script type="text/javascript">
    </script>

     <%-- auto compete --%>
    <link rel="stylesheet" href="css/jquery.ui.all.css">
    <script  type="text/JavaScript" src="js/jquery.ui.core.js"></script>
	<script  type="text/JavaScript" src= "js/jquery.ui.widget.js"></script>
	<script  type="text/JavaScript" src="js/jquery.ui.position.js"></script>
	<script  type="text/JavaScript" src="js/jquery.ui.autocomplete.js"></script>
 <script>
   var data = [ "http://localhost:9080/elconverter/Oscar.docx", "http://w"];
   jQuery.noConflict();
	jQuery(function($) {
		$("#urls" ).autocomplete(data, {matchContains:true,
    minChars:0});
	
	</script>

    <title> API Demo </title>
  </head>
  <body>
    <h1 align="center"> Elookinto Viewer API Converter Demo </h1>

    <% //out.println(url + ".." + ff); %>
    <br/>
    <form method="Get">
      <table align="center">
        <tr> <td> URL: </td> <TD>
            <input type="text" name="url" id="urls" value="<%=url%>" size="80"/> </TD>
        </tr>
         <tr> <td> Highlighted Words: </td> <TD>
            <input type="text" name="q" value="<%= q %>" size="80"/> </TD>
        </tr>
        <tr>  <td> Format: </td> <TD>
            <Select name="f">
              <option value="rtf" > rtf </option>
              <option value="html" > html </option>
              <option value="pdf" > pdf </option>
            </Select>
        </tr>
        <tr> <td colspan="2" align="center"> <input type="submit" value="Submit" /> </td></tr>
      </table>
    </form>
    <br/> <br/>
    <div align="center">
      <iframe align="center" width="1000" height="1800" id="showID2" style="border-width: 0;text-align: center">

      </iframe>
    </div>
  </body>
</html>
